In a semiconductor device, a groove may be formed in an insulating film by etching to form wiring patterns in the groove. In a case where an aspect ratio of the insulating film is high, a gas containing carbon (C) and fluorine (F) may be used as the etching gas. Improvements in a patterning method using such an etching gas are desired.